from django.contrib import admin
from MyBlog.my_admin_site import my_site
from app.admin import MyBaseAdmin
from link.models import FriendLink



#友链
@admin.register(FriendLink,site=my_site)
class FriendLinkAdmin(admin.ModelAdmin,MyBaseAdmin):
    list_display = ['id','title','url','desc','weight']
    list_display_links = list_display[:1]  # 默认的链接是id
    search_fields = list_display  # 搜索的字段同list_display
    list_filter = list_display[1:3]  # 过滤字段为前3个字段